package com.atguigu.gmall.list.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.list.client.impl.ListFeignClientImpl;
import com.atguigu.gmall.model.list.SearchParam;
import com.atguigu.gmall.model.list.SearchResponseVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author BrookPeng
 * @Date 2020/11/26 16:36
 * @Version 1.0
 */
@FeignClient(value = "service-list", fallback = ListFeignClientImpl.class)
public interface ListFeignClient {

    // 商品热度更新
    @GetMapping("/api/list/inner/hotScore/{skuId}")
    public Result hotScore(@PathVariable("skuId") Long skuId);

    // 开始搜索 http://.... /api/list
    @PostMapping("/api/list")
    public SearchResponseVo search(@RequestBody SearchParam searchParam);
}
